*** Settings ***
Suite Setup       Set Log Level    trace
Test Setup        One APP Login    &{appUser1}[name]    &{appUser1}[pwd]
Resource          ../../../Resources_Config.robot

*** Test Cases ***
发布车友活动-正常流程
    #准备参数
    ${url}    Set Variable    ${publish_activity}
    ${maxNum}    Set Variable    200
    ${poiName}    Set Variable    成都IFS
    ${locations}    Set Variable    104.081412,30.654845
    ${city}    Set Variable    成都市
    ${startDate}    Time Delta    days=20
    ${endDate}    Time Delta    days=40
    ${deadlineDate}    Time Delta    days=10
    ${title}    Rand Name    Auto-circle-
    ${userPhone}    Set Variable    15215001508
    ${isExclusive}    Set Variable    1
    ${content}    Random Chn    100
    ${type}    Set Variable    2
    ${richTextDict}    Create Dictionary    content=${content}    type=${type}
    ${richText}    Create List    ${richTextDict}
    # 构造请求体
    ${postdata}    Create Dictionary    maxNum=${maxNum}    poiName=${poiName}    endDate=${endDate}    city=${city}    startDate=${startDate}
    ...    title=${title}    userPhone=${userPhone}    locations=${locations}    deadlineDate=${deadlineDate}    richText=${richText}    isExclusive=${isExclusive}
    ${rsp}    Post Request    ${url}    ${postdata}
    # 校验结果
    Should Be Equal As Strings    ${rsp['code']}    ${200}
    Should Be Equal As Strings    ${rsp['body']['returnStatus']}    SUCCEED
    #校验更多结果
